<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class crm_supplier extends Model
{
    //供应商表模型
    protected $table = 'crm_supplier';
    public $timestamps = false;
    public function Admin_users()
    {
        return $this->belongsTo('App\Admin_users','staff_id');
    }
    // 关联账号类别表
    public function supplier_type()
    {
    	return $this->hasMany('App\supplier_type','supplier_id','id');
    }
    public function crm_deals()
    {
         return $this->belongsToMany('App\crm_deal');
    }
}
